def jiafa(jia):
    k = 0
    for i in jia:
        k += i
        print(f"{i}=", end='') if i == jia[-1] else print(f"{i}+", end='')
    print(k)
    return k


def jianfa(jia):
    k = 0
    for i in jia:
        if i == jia[0]:
            k = i
        else:
            k = k - i
        print(f"{i}=", end='') if i == jia[-1] else print(f"{i}-", end='')
    print(k)
    return k


def chengfa(jia):
    k = 1
    for i in jia:
        k = i * k
        print(f"{i}=", end='') if i == jia[-1] else print(f"{i}*", end='')
    print(k)
    return k


def chufa(jia):
    k = 0
    for i in jia:
        if i == jia[0]:
            k = i
        else:
            k = k / i
        print(f"{i}=", end='') if i == jia[-1] else print(f"{i}/", end='')
    print(k)
    return k


m = input("输入计算的类型（+ - * /）：")
l1 = []
while True:
    n = input("输入任意个数据(直接回车结束输入)：")
    if n == "":
        break
    l1.append(int(n))
if m == "+":
    jiafa(l1)
elif m == "-":
    jianfa(l1)
elif m == "*":
    chengfa(l1)
elif m == "/":
    chufa(l1)
else:
    print("运算法则还在研发中")
